export const tableConfig = {
	stripe: true,
	border: true,
	columns: [
		{ label: '离院日期', prop: 'checkoutDate' },
		{ label: '回院日期', prop: 'returnTime' },
		{ label: '离院联系人', prop: 'familyName' },
		{ label: '联系方式', prop: 'familyPhone', plusXing: '5,2' },
		{ label: '与老人关系', prop: 'elderlyRelationshipLabel' },
		{ label: '离院原因', prop: 'checkoutReasonLabel' },
		{ label: '离院说明', prop: 'checkLeaveIllustrate' },
		{
			label: '操作',
			prop: 'menu',
			width: 300,
			fixed: 'right',
		},
	],
}

export const formConfig = {
	inline: false,
	showBtn: true,
	labelPosition: 'top',
	column: [
		{
			label: '离院时间',
			prop: 'checkoutDate',
			type: 'date',
			format: 'YYYY年MM月DD',
			valueFormat: 'YYYY-MM-DD',
			changeField: false,
			labelPosition: 'top',
			span: 8,
		},
		{
			label: '离院原因',
			prop: 'checkoutReason',
			propName: 'checkoutReasonLabel',
			changeField: true,
			type: 'remoteSelect',
			code: 'CHECKOUT_REASON',
			api: 'getDictItemList',
			filterKey: 'value',
			multiple: false,
			span: 8,
		},
		{
			label: '回院时间',
			prop: 'returnTime',
			type: 'date',
			format: 'YYYY年MM月DD',
			valueFormat: 'YYYY-MM-DD',
			changeField: false,
			labelPosition: 'top',
			span: 8,
		},
		{
			label: '办理时间',
			prop: 'transactDate',
			type: 'datetime',
			format: 'YYYY年MM月DD HH:mm:ss',
			valueFormat: 'YYYY-MM-DD HH:mm:ss',
			changeField: false,
			labelPosition: 'top',
			span: 8,
		},
		{
			label: '办理人姓名',
			prop: 'transactorName',
			maxlength: '50',
			showWordLimit: true,
			type: 'text',
			labelPosition: 'top',
			span: 8,
		},
		{
			label: '离院说明',
			prop: 'checkLeaveIllustrate',
			type: 'textarea',
			span: 24,
		},
		{
			label: '备注',
			prop: 'checkoutNote',
			maxlength: '1000',
			showWordLimit: true,
			type: 'textarea',
			labelPosition: 'top',
			span: 24,
		},
	],
}

export const api = {
	index: 'view_dpElderlyLeaveRecord_page',
	edit: 'view_dpElderlyLeaveRecord_edit',
	revoke: 'view_dpElderlyLeaveRecord_revoke',
}
export const auth = {
	index: 'view_dpElderlyLeaveRecord_page',
	edit: 'view_dpElderlyLeaveRecord_edit',
	revoke: 'view_dpElderlyLeaveRecord_revoke',
}
export const baseConfig = {
	pageName: '请假离院记录',
	dictcodes: ['CHECKOUT_REASON'],
	rowKey: 'id',
	addLabel: '新增',
	tipLabel: 'oldmanName',
	exportMqTopic: '/ning/export/',
	paramsObj: {},
	menuBtn: [
		{
			icon: 'editor',
			label: '编辑',
			type: 'primary',
			operate: 'edit',
			auth: auth.edit,
			text: true,
			show: true,
			condition: '(row)=>row.status ==1',
		},
		{
			condition: '(row)=>row.status ==1',
			icon: 'detail',
			label: '撤销',
			type: 'primary',
			operate: 'revoke',
			auth: '',
			text: true,
			show: true,
		},
	],

	api,
	auth,
	formConfig,
	dialogConfig: {
		width: '75%',
	},
	tableConfig,
}
